package baiqitun.stupro.subject.mapper;

import baiqitun.stupro.subject.entity.SysStudentInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 学生信息表 Mapper 接口
 * </p>
 *
 * @author kedaji
 * @since 2020-04-01
 */
public interface SysStudentInfoMapper extends BaseMapper<SysStudentInfo> {

    @Select("SELECT MAX(create_datetime) FROM stupro_student_info")
    LocalDateTime maxYear();

    @Select("SELECT MIN(create_datetime) FROM stupro_student_info")
    LocalDateTime minYear();

    @Select("SELECT distinct create_datetime FROM stupro_student_info")
    List<LocalDateTime> years();
}
